import Vue from "vue";
import VueRouter from "vue-router";
// import Home from '../views/Home.vue'
import FindMusic from "../views/findMusic";
import MyMusic from "../views/myMusic";
import Friends from "../views/Friends";

import wjwRouter from "./module/wjwRouter";
import cyzRouter from "./module/cyzRouter";
import yrnRouter from "./module/yrnRouter";
import dlxRouter from "./module/dlxRouter";
import zqRouter from "./module/zqRouter";

Vue.use(VueRouter);

const routes = [
  {
    path: "/",
    redirect: "/find/recommend",
  },
  {
    path: "/find",
    redirect: "/find/recommend",
    // name: "FindMusic",
    component: FindMusic,
    children: [
      ...wjwRouter,
      ...cyzRouter,
      ...yrnRouter,
      ...dlxRouter,
      ...zqRouter,
    ],
  },
  {
    path: "/my",
    component: MyMusic,
  },
  {
    path: "/friend",
    component: Friends,
  },
  // {
  //   path: '/about',
  //   name: 'About',
  // route level code-splitting
  // this generates a separate chunk (about.[hash].js) for this route
  // which is lazy-loaded when the route is visited.
  // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
];

const router = new VueRouter({
  routes,
});

export default router;
